<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
  <!ENTITY nbsp "&#x00A0;">
]>
<xsl:stylesheet
	version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:msxml="urn:schemas-microsoft-com:xslt"
	xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" xmlns:Utils="urn:Utils"
	exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets Utils ">


  <xsl:output method="xml" omit-xml-declaration="yes"/>

  <xsl:param name="currentPage"/>
  <xsl:param name="listPage" select="$currentPage/ancestor-or-self::List"></xsl:param>

  <xsl:template match="/">

    <!-- start writing XSLT -->

    <section id="content">
      <div class="container_12">
        <div class="wrapper">
          <article class="grid_12">
            <h2 class="border1">
              <xsl:value-of select="$listPage/listTitle"/>
            </h2>
          </article>
          <article class="grid_12">
            <xsl:for-each select="$listPage/child::PartnerPage">
              <article class="grid_4">
                <div class="page5-box1">
                  <xsl:if test="contentThumbnail!=''">
                    <figure class="page5-img1">
                      <img src="{Utils:GetImageUrl(contentThumbnail)}" class="parceiros_logo"  alt="" />
                    </figure>
                  </xsl:if>
                  <xsl:choose>
                    <xsl:when test="contentLink !='' ">
                      <a class="link1" href="{contentLink}" target="_blank">
                        <xsl:value-of select="contentTitle"/>
                      </a>
                    </xsl:when>
                    <xsl:otherwise>
                      <a class="link1">
                        <xsl:value-of select="contentTitle"/>
                      </a>
                    </xsl:otherwise>
                  </xsl:choose>
                  <p>
                    <xsl:value-of select ="umbraco.library:TruncateString(contentSummary, 140,'...')" disable-output-escaping="yes"></xsl:value-of>
                  </p>
                </div>
              </article>
            </xsl:for-each>
          </article>
        </div>
      </div>
    </section>




  </xsl:template>

</xsl:stylesheet>